/**
 * 屏幕适配
 */
cc.Class({
    extends: cc.Component,

    properties: {
        // foo: {
        //     // ATTRIBUTES:
        //     default: null,        // The default value will be used only when the component attaching
        //                           // to a node for the first time
        //     type: cc.SpriteFrame, // optional, default is typeof default
        //     serializable: true,   // optional, default is true
        // },
        // bar: {
        //     get () {
        //         return this._bar;
        //     },
        //     set (value) {
        //         this._bar = value;
        //     }
        // },
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {
        this.init();
    },
    init:function(){
        var size = cc.view.getFrameSize();
        let com = this.node.getComponent(cc.Widget);
        var isIphoneX = (size.width == 2436 && size.height == 1125) ||
            (size.width == 1125 && size.height == 2436) ||
            (size.width == 1624 && size.height == 750) ||
            (size.width == 750 && size.height == 1624) ||
            (size.width == 812 && size.height == 375) ||
            (size.width == 375 && size.height == 812)
        if (isIphoneX) {
            com.top = com.top+70;
          
        }else{
           
        }
    },
    // update (dt) {},
});
